package com.ninjia.core.services.impl;

import com.ninjia.core.services.ErrorMessageUtils;
import org.springframework.stereotype.Service;
import com.ninjia.common.pojo.ErrorDict;

/**
 * Created by xiabin on 2017/7/26.
 */
@Service
public class ErrorMessageUtilsImpl implements ErrorMessageUtils {

    private ThreadLocal<ErrorDict> lastError = new ThreadLocal<ErrorDict>();

    @Override
    public ErrorDict getLastError() {
        return lastError.get();
    }

    @Override
    public void setError(ErrorDict error) {
        lastError.set(error);
    }
}
